# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=mmh
pkgver=0.4
pkgrel=0
pkgdesc="MUA for users who like the unix philosophy"
url="http://marmaro.de/prog/mmh/"
arch="all"
license="BSD"
makedepends="ncurses-dev autoconf flex"
subpackages="$pkgname-doc"
source="http://marmaro.de/prog/${pkgname}/files/${pkgname}-${pkgver}.tar.gz
	symlinks.patch"

builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	default_prepare

	cd "$builddir"
	update_config_sub
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc/$pkgname \
		--mandir=/usr/share/man \
		--libdir=/usr/lib/$pkgname \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" SETGID_MAIL= \
		-C "$builddir" install
}

sha512sums="f795aafae4727267ed622feb2b1d5a7dfba3e540d89b155d45e7f532030082a512917f391b12959c7b3a8e5d02ab50c39c63cc79c9a51edb3e6bdba2d2157109  mmh-0.4.tar.gz
d6b92f582a15a2664f275b32e6ddf827fd0176e5e289a27bb210e9c58e02fa159bdf26c01f1227dad64ec5fb55ab5aac4b86246ba66ef46c656749be2a11842f  symlinks.patch"
